package com.authine.cloudpivot.ext.enums.kingdee;

/**
 * @Author: 李国祥
 * @Date: 2019/11/19 13:26
 * @Version 1.0
 */
public enum KingDeeInvoiceApplyTypeEnum {
    ALL(0, "全部"),
    VAT_ORDINARY(1, "增值税普通发票"),
    VAT_EL_TICKET(2,"增值税电子普通发票"),
    VAT_SPECIAL(3, "增值税专用发票"),
    NO_INVOICING(4, "不开票");

    public Integer id;
    public String text;

    private KingDeeInvoiceApplyTypeEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static KingDeeInvoiceApplyTypeEnum get(Integer code) {

        for (KingDeeInvoiceApplyTypeEnum c : KingDeeInvoiceApplyTypeEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public String toString() {
        return text;
    }
}
